package com.hliushi.learn.scheduler;

import lombok.extern.slf4j.Slf4j;

/**
 * @author llhuang10
 * @date 2021/8/16 21:12
 */
@Slf4j
public class SimpleDemo01 {

    public static final long timeInterval = 1000;

    public static void main(String[] args) {
        // 任务执行间隔时间
        new Thread(() -> scheduler()).start();
    }


    /**
     * @param
     * @return
     */
    public static void scheduler() {
        while (true) {

            // System.out.println("info----------");
            log.info("info---------------");
            try {
                Thread.sleep(timeInterval);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
